-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix support for HHVM #106
Fix support for HHVM #106
Conversation
Fixes the fatal error in HHVM (null pointer reference)
See #101. Turns out fsockopen was overriding this, but we have contextual checking support now, so let's use that.
@@ -393,6 +393,10 @@ public static function test($capabilities = array()) { | |||
if (isset( $capabilities['ssl'] ) && $capabilities['ssl']) { | |||
if (!extension_loaded('openssl') || !function_exists('openssl_x509_parse')) | |||
return false; | |||
|
|||
// Currently broken, thanks to https://github.com/facebook/hhvm/issues/2156 | |||
if (strpos(PHP_VERSION, 'hiphop') !== false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The supported way to check for hhvm is if(defined('HHVM_VERSION'))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, thanks. I'll switch to that then.
@@ -274,7 +275,6 @@ protected function setup_handle($url, $headers, $data, $options) { | |||
|
|||
public function process_response($response, $options) { | |||
if ($options['blocking'] === false) { | |||
curl_close($this->fp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain the removal here? My group is using non-blocking mode, and the flow here doesn't really look like there should ever have been a double-close. However, this looks like it will keep curl open a bit longer than necessary.
Fixes #93.